package com.wing.system.model.entity;

import java.io.Serializable;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.core.enums.IEnum;
import com.wing.mybatis.common.BaseEntity;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import java.math.BigDecimal;

/**
 * 显示/规则配置
 *
 * @author
 */
@Data
@NoArgsConstructor
@Accessors(chain = true)
@TableName("sys_system_rule_info")
public class SystemRuleInfo extends BaseEntity<SystemRuleInfo> implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 创建者
     */
    private Long creator;

    /**
     * 修改者
     */
    private Long modifier;

    /**
     * 创建人
     */
    private String creatorName;

    /**
     * 修改人
     */
    private String modifierName;

    /**
     * 是否显示价格
     */
    private Boolean showPriceFlag;

    /**
     * 总价控制
     */
    private BigDecimal total;


    private Boolean totalFlag;

    private Boolean spaceUserShareFlag;

    private Boolean spaceSkuShareFlag;

    private Boolean spaceTempMoreFlag;

    private Boolean spaceTempUserShareFlag;

    private Boolean spaceTempSkuShareFlag;

    private Integer defaultAlarmStock;

    private Integer defaultSpaceQuantity;

    private Boolean abFlag;

    private Boolean devicePageFlag;

    private Boolean lifeFlag;

    private Boolean warehouseInventoryFlag;

    private Boolean outOrderFlag;
    public enum WorkOrderWay implements IEnum<Integer> {

        /**
         * 来自MES
         */
        mes(0,"来自MES"),
        /**
         * 手动输入
         */
        manual(1,"手动输入"),
        /**
         * 简版管理
         */
        simple(2,"简版管理");

        private int code;
        private String desc;

        WorkOrderWay(int code,String desc){
            this.code=code;
            this.desc=desc;
        }

        @Override
        public Integer getValue(){
            return this.code;
        }

        public String getDesc(){
            return this.desc;
        }
    }
    /**
     * 工单方式
     */
    private WorkOrderWay workOrderWay;

    /**
     * 工单方式描述
     */
    @TableField(exist = false)
    private String workOrderWayDesc;

    public String getWorkOrderWayDesc() {
        return workOrderWay == null ? null : workOrderWay.getDesc();
    }

    /**
     * 库存告警管理员
     */
    private String  inventoryManageUserId;


    private Boolean recycleCauseRequired;


    private Boolean outFirstCellCabFlag;

    /**
     * 领新审核管理员
     */
    private String  mailManagementUserId;

    /**
     * 换刀时间
     */
    private Integer changeTime;

    private Boolean orderQueryFlag;
}
